package com.changgou.service.goods.dao;

import com.changgou.goods.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;
public interface BrandMapper extends Mapper<Brand> {
    @Select("SELECT t1.name FROM  tb_brand t1  INNER JOIN tb_category_brand t2  ON t1.id=t2.brand_id INNER JOIN tb_category t3 ON t2.category_id=t3.`id` WHERE t3.name =#{categoryName}))")
    public List<Map> findBrandListByCategoryName(@Param("categoryName")String categoryName);
}
